﻿using Colorful.Furniture.Enum;
using Colorful.Furniture.IEntity;
using FreeSql.DataAnnotations;
using System;

namespace Colorful.Furniture.ErpFinanceManagement;

/// <summary>
/// 财务加款表
/// </summary>
[Table(Name = "erp_finance_records")]
public class FinanceRecords : AuditTenantSoftDeleteAggregateRoot
{

    /// <summary>
    /// 编码
    /// </summary>
    [Column(Name = "id", IsPrimary = true)]
    public Guid Id { get; set; }

    /// <summary>
    /// 加款订单号
    /// </summary>
    [Column(Name = "no", StringLength = 60)]
    public string No { get; set; }

    /// <summary>
    ///   交易名称
    /// </summary>
    [Column(Name = "account_name", StringLength = 150)]
    public string AccountName { get; set; }

    /// <summary>
    ///   交易银行
    /// </summary>
    [Column(Name = "bank_name", StringLength = 150)]
    public string BankName { get; set; }

    /// <summary>
    ///   交易流水
    /// </summary>
    [Column(Name = "bank_no", StringLength = 150)]
    public string BankNo { get; set; }

    /// <summary>
    ///   供应商/客户名字
    /// </summary>
    [Column(Name = "name", StringLength = 150)]
    public string Name { get; set; }

    /// <summary>
    ///  供应商/客户id
    /// </summary>
    [Column(Name = "customer_id")]
    public Guid? CustomerId { get; set; }

    /// <summary>
    /// 加款申请状态：-1：审核驳回、0：加款失败、1：待审核、2：加款成功
    /// </summary>
    [Column(Name = "status")]
    public EnumAddMoneyStatus? Status { get; set; }

    /// <summary>
    /// 收/付款金额
    /// </summary>
    [Column(Name = "price", DbType = "decimal(14,2)")]
    public decimal? Price { get; set; }

    /// <summary>
    /// 收/付款时间
    /// </summary>
    [Column(Name = "receive_time")]
    public DateTime? ReceiveTime { get; set; }

    /// <summary>
    /// 对账单图片
    /// </summary>
    [Column(Name = "photo", StringLength = 800)]
    public string Photo { get; set; }

    /// <summary>
    /// 发票图片
    /// </summary>
    [Column(Name = "invoice_img", StringLength = 800)]
    public string InvoiceImg { get; set; }

    /// <summary>
    ///  加款备注
    /// </summary>
    [Column(Name = "remark", StringLength = 600)]
    public string Remark { get; set; }

    /// <summary>
    ///  审核备注
    /// </summary>
    [Column(Name = "approve_remark", StringLength = 600)]
    public string ApproveRemark { get; set; }

    /// <summary>
    ///  类型：1 = 加款申请 ；2 = 付款
    /// </summary>
    [Column(Name = "type")]
    public int? Type { get; set; }


}